<template>
  <div class="notice kaiti">
    <h2>公告栏：</h2>
    <p>{{notice?.text}}</p>
  </div>
</template>
<script setup lang="ts">
import { getNotice } from '../service/api/Blogger'
const notice = ref()
const getNoticeList = async ()=> {
  await nextTick()
  try{
    const res:any = await getNotice({})
    const data = res.data._value.data
    notice.value = data[0]
  }catch(err) {
    console.log(err)
  }
}
onMounted(()=>{
  getNoticeList()
})
</script>
<style scoped lang="scss">
.notice{
  width: 230px;
  padding: 20px 10px;
  background-color: $yun-color;
  margin-bottom: 20px;
  border-radius: 6px;
  height: auto;
  color: #fff;
  h2{
    font-size: 18px;
    margin-bottom: 20px;
  }
  p{
    line-height: 30px;
    font-size: 14px;
  }
}
</style>